package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Notice;
import cn.wolfcode.domain.ReadStatus;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Notice record);

    Notice selectByPrimaryKey(Long id);

    List<Notice> selectAll();

    List<Long> selectAllByPublishTrue();

    List<Long> selectAllByPublish2();

    int updateByPrimaryKey(Notice record);

    List<Notice> selectForList(QueryObject qo);

    List<Long> selectByEmployeeId(Long id);

    void insertRelation(@Param("id") Long id, @Param("noticeId") Long noticeId);

    //更新用户读取状态

    void UpdateReadStatus(@Param("noticeId") Long noticeId, @Param("employeeId") Long employeeId, @Param("readStatus") Long readStatus);

    void updatePublish(@Param("id") Long id, @Param("publishStatus") boolean publishStatus);


    int selectNoRead(Long id);

    ReadStatus selectByReadCount();
}